Many communication protocols, such as Hypertext Transfer Protocol (HTTP), transfer data using a connection paradigm. In order to transmit data, some type of handshaking is performed to open the connection. Data is then transmitted, and, at some later point in time, the connection is closed.
In HTTP, a connection is opened by the client using a particular method. HTTP supports various types of methods, such as GET methods (for retrieving data from the server), and POST methods(for transmitting data to the server). In a GET method, the client requests that the server send a copy of some resource that is stored on, or created by, the server. In a POST method, the client requests that the server stand ready to receive some specified amount of data from the client. Thus, in theory a client and a server can exchange an arbitrary amount of information by continually opening HTTP connections with GET and POST methods.
However, continually opening HTTP may be an ineffective way to implement communication for some applications. Opening an HTTP connection is not cost-free. There is an overhead cost of time and resources involved in opening each connection. If a client wishes to send or receive many pieces of data per second to a server and opens a new connection for each piece, then the number of connections that are opened represents a significant overhead cost. HTTP provides some ways to reduce the number of connections. For example, HTTP provides a keep-alive mechanism in which the same connection may be kept open for an arbitrary time and re-used for plural requests. Also, HTTP provides a pipelining mechanism in which plural requests may be sent sequentially over the same connection. However, these mechanisms may be inadequate to implement certain scenarios.
For example, a medical imaging application may respond to instructions from a human operator as to what images the operator would like to see. The application may request specific images from a server in response to instructions from the operator (or may request images based on its own logic, without a specific instruction from an operator). Since a pipeline is opened for a finite number of requests, using a pipeline would force the application to group requests together artificially to be sent on a specific pipeline. Moreover, if an application wanted to cancel a request that had already been sent on the pipeline, then the application would have to open a new connection to transmit such a cancellation request. However, opening new connections (or re-using existing “keep-alive” connections) to transmit new instructions (such as cancelation requests) to the server incurs an administrative overhead cost.